#include <54func.h>
int main(int argc,char *argv[])
{
    // ./0_client_udp 192.168.187.128 1234
    ARGS_CHECK(argc,3);
    
    int sockfd = socket(AF_INET,SOCK_DGRAM,0);
    ERROR_CHECK(sockfd,-1,"socket");

    //初始化
    struct sockaddr_in serveraddr;
    serveraddr.sin_family = AF_INET;
    serveraddr.sin_port = htons(atoi(argv[2]));
    serveraddr.sin_addr.s_addr = inet_addr(argv[1]);

    //char buf[4096] = {0};
    sendto(sockfd,"hello",5,0,(struct sockaddr *)&serveraddr,sizeof(serveraddr));
    
    return 0;
}
